package com.read.controller;

import com.read.common.response.RespResult;
import com.read.dto.params.NovelCommentParamsDto;
import com.read.service.CommentService;
import com.read.util.RespUtil;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sh-sunb6
 * @description 评论相关的 Controller
 * @date 2019-03-18 11:13
 */
@Api(tags = "评论相关 Controller")
@RestController
@RequestMapping("/comment")
public class CommentController {

    @Autowired
    private CommentService commentService;

    @GetMapping("add")
    public RespResult addComment(NovelCommentParamsDto params) {
        commentService.userAddComment(params);
        return RespUtil.success();
    }

}
